package com.team.mp.api.util;

import org.springframework.util.StringUtils;

public class PhoneUtil {
    public static boolean checkPhone(String phone) {
        //1.校验
        if (StringUtils.hasLength(phone)) {
            //2.正则 校验 手机号规则
            return (phone.matches("^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])[0-9]{8}$"));
        }
        return false;
    }
}
